Skip to content

Add cache_pygates feature to accelerate crate.#13183

Merged
mtreinish merged 2 commits into
Qiskit:mainfrom
raynelfss:accelerate-cache-pygate
Sep 18, 2024
Merged

Add cache_pygates feature to accelerate crate.#13183
mtreinish merged 2 commits into
Qiskit:mainfrom
raynelfss:accelerate-cache-pygate

Conversation

@raynelfss

Copy link
Copy Markdown
Contributor

Summary

The following commits add the cache_pygates feature from the circuit crate into accelerate.

Details and comments

Since we added rust native methods to add operations into the DAGCircuit (thanks in part to #13143), we make use of the cache_pygate feature which is only available in the circuit crate. A couple of transpiler passes which require building instances of DAGCircuit from Rust entirely (mainly #13141, and #13137) are using these functions, they need to respect the bounds this feature specifies or else they would not compile.

A couple of teammates have already implemented this flag as part of their PRs but, to prevent a future merge conflict debacle, I decided to put it in this PR. These commits add the feature to accelerate so that people don't have to worry about that in the future.

Co-authored-by: Elena Peña-Tapia <57907331+ElePT@users.noreply.github.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
@raynelfss raynelfss requested a review from a team as a code owner September 18, 2024 18:16
@qiskit-bot

Copy link
Copy Markdown
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@raynelfss raynelfss added the Changelog: None Do not include in the GitHub Release changelog. label Sep 18, 2024

@mtreinish mtreinish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM this is a straightforward addition and one I've done in some local code that isn't quite ready for a PR so glad to spin it out here even if nothing is using it yet.

@mtreinish mtreinish enabled auto-merge September 18, 2024 18:43
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 10927852001

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 13 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.008%) to 88.819%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/parse.rs 6 97.61%
crates/qasm2/src/lex.rs 7 92.48%
Totals Coverage Status
Change from base Build 10926067236: -0.008%
Covered Lines: 73475
Relevant Lines: 82724

💛 - Coveralls

@mtreinish mtreinish added this pull request to the merge queue Sep 18, 2024
Merged via the queue into Qiskit:main with commit ee7e0ea Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: None Do not include in the GitHub Release changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants